#pragma once

#define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
#define DbgPrint(x, ...) { printf("[%s::%s] -> "  x  "\n",  __FILENAME__, __FUNCTION__, __VA_ARGS__); }

#define	ANGLE2SHORT(x)	((int)((x)*65536/360) & 65535)
#define	SHORT2ANGLE(x)	((x)*(360.0/65536))
#define PI 3.14159265358979323846264338327950288f

namespace menuDef {
	extern XINPUT_STATE state;

	extern int whiteMaterial;
	extern int gradientMaterial;
	extern int normalFont;

	extern int dwScreenMaxX, dwScreenMaxY;
	extern int dwScreenCenterX, dwScreenCenterY;

	extern float fMenuPosX, fMenuPosY;
	extern float fMenuWidth;

	extern BOOL bMenuOpen;
}

namespace CG {
	extern BOOL bInGameCached;
	extern BOOL bConnected;
	extern BOOL bLobbyInitialized;
	extern BOOL bQuittingGame;
	extern BOOL NeverDLC;
	extern BOOL bKillThread;
	extern BOOL bExitedThread;
}

namespace MenuOptions {

	extern BOOL bRME_NoClip;
	extern BOOL bRME_NoClipBind;
	extern BOOL bRME_GodMode;
	extern DWORD dwRME_GodMode, dwRME_SuperSpeed, dwRME_Invisibility, dwRME_InfraredVision, dwRME_SetMode;
	extern DWORD dwRME_Client_GodMode, dwRME_Client_SuperSpeed, dwRME_Client_Invisibility, dwRME_Client_InfraredVision, dwRME_Client_SetMode;

	extern BOOL bLaunchCustomGT, bRainbowGT, bCycleGT;

	extern DWORD dwRME_AllClients_GodMode_ON, dwRME_AllClients_GodMode_OFF, dwRME_AllClients_SuperSpeed_ON, dwRME_AllClients_SuperSpeed_OFF, dwRME_AllClients_Blackscreen, dwRME_AllClients_TakeWeaponsAway, dwRME_AllClients_TakeAmmoAway;

	extern DWORD dwRME_ChangeMapIndex;
	extern DWORD dwRME_ChangeGameTypeIndex;
	extern BOOL g_bSpinBotEnabled;
	extern BOOL bRenameSelectedClient;
	extern BOOL bCustomRenameAllClients;
	extern DWORD dwGiveWeaponIndex, dwRME_GiveWeaponIndex;
	extern BOOL bMakeEveryoneThrowNades;
	extern BOOL bAntiQuitAuto;
	extern DWORD dwAntiQuitIndex;
	extern BOOL bMoveEveryoneAround;
	extern DWORD dwRME_ModelIndex;
	extern BOOL bWalkOnCountdown;

	extern BOOL bAimbot;
	extern DWORD dwAimbotType, dwTargetType, dwTargetBone;
	extern BOOL bNoSpread;
	extern BOOL NeverDLC;
	extern BOOL bAutoShoot;
	extern BOOL bPingPrediction;
	extern BOOL SPAM_SOUND;
	extern BOOL bAntiAim;
	extern BOOL bDrawAllies, bDrawAxis;
	extern DWORD dwBoxType;
	extern BOOL bDrawNames, bDrawDistances, bDrawWeapons, bDrawBones;
	extern BOOL bDrawSnaplines;
	extern BOOL bSmallCrosshair;
	extern BOOL bHealthBar;
	extern BOOL bRainbowEffect;
}

//extern void AngleVectors(vec3 angles, vec3* forward, vec3* right, vec3* up);
extern void VectorToAngle(vec3* direction, vec3* out);
extern vec3 VectorToAngles(vec3& Delta);